<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>顺风车  --- 我做主：我的物品收藏</title>
<link href="${ctx}/css/myhome-css/home_service_base.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/css/myhome-css/favorite.css" rel="stylesheet" type="text/css" />
</head>
<body>

    <!--右栏开始-->
    <div id="orderList" class="account_right">
      <h2>管理我收藏的商品</h2>
      <h3>这里可以查看、删除、购买我所收藏的商品！</h3>
      <div class="no_dang_m">
        <div class="no_dang_border">
		  <!--下面是右边内容方框-->
        <div class="favoriteList">
        <div class="favoriteListTitle">
        	<span style="float:left;">我的商品收藏</span><span class="listRight">共收藏<strong><c:out value="${number}" escapeXml="false"/></strong>本图书</span>
        </div>
        <div style="clear:both;"></div>
        <div class="favorites">
        <!--
        	<ul>
            	<li><img src="${ctx}/images/myhome-img/javaMS.jpg" /></li>
            	<li>新山地变速车</li>
            	<li>八五新，车况良好，附带两把锁。有意者短信联系15168309242</li>
            	<li>山地车</li>
            	<li>
                	<a href="#">查看</a>&nbsp;
                    <a href="#">删除</a>&nbsp;
                    <a href="#">购买</a>&nbsp;
                </li>
            </ul>
        -->
        <s:iterator value="page.pageList" status="itStatus">
            <ul>
            	<li><img src="${ctx}/images/myhome-img/javaMS.jpg" onerror="this.src='${ctx}/images/myhome-img/javaMS.jpg'"/></li>
            	<li><c:choose><c:when test="${empty books[itStatus.index].bookName}">车型：山地车</c:when>
            		<c:otherwise><c:out value="${books[itStatus.index].bookName}" escapeXml="false"/></c:otherwise></c:choose>
            	</li>
            	<li><c:choose><c:when test="${empty books[itStatus.index].author}">卖家：无</c:when>
            		<c:otherwise><c:out value="${books[itStatus.index].author}" escapeXml="false"/></c:otherwise></c:choose>
            	</li>
            	<li><c:choose><c:when test="${empty books[itStatus.index].publisher}">牌子：无</c:when>
            		<c:otherwise><c:out value="${books[itStatus.index].publisher}" escapeXml="false"/></c:otherwise></c:choose>
            	</li>
            	<li>
                	<a href="#">查看</a>&nbsp;
                    <a href="${ctx}/home/favorite-book!delete.action?id=${id}" onclick="return wenwen();">删除</a>&nbsp;
                    <a href="#">购买</a>&nbsp;
                </li>
            </ul>
        </s:iterator>
        </div>
        <div class="nextPage">
          <n:page actionUrl="${ctx}/home/favorite-book.action" sumPages="${page.totalPages}" activePage="${page.currentPage}" pageNoKey="niagara_params_pageNo"/>
      	</div>
      </div>
	<!--右边内容方框结束-->
	    <div class="clear"></div>
        </div>       
      </div>
      </div>
    <!--右栏结束-->
<script type="text/javascript">
function wenwen(){
	var flag = confirm("您确定要删除吗？");
	if(flag){
		return true;
	}else{
		return false;
	}
}
</script>
</body>
</html>